Hallo, I tried to create a button "Help" and link it with a Help document (*.doc) which is saved on the project share. |
Re: Open files on share / pc / internet
You can use the "system" perm:
if (platform=="WIN32"}{system "C:\\Program Files\\Microsoft Office\\OFFICE11\\WINWORD.EXE \"<complete_path_to_your_word_file>\""}
|
Re: Open files on share / pc / internet system("p:/MyFolder/MyHelpFile.doc") should be enough. Notice however that if someone else has it open this may not work.
Doh! I've got some massive function that looks for the 'winword.exe' and 'excel.exe' files on the computer, containing a fairly long list of places to look, including Registry values. I really should take my own advise above and abandon all that. Nuance: the 'system' command will return after it submits the requiest to the OS, it doesn't wait for the file to be displayed. That won't matter to you unless you figure to do something with the open Word file. There is also this command that will wait for it to actually finish loading. Other's have made this work but for some reason it doesn't work for me: int win32SystemWait_(string commandString,string& sResult, int waitTime) 'waitTime' is in milliSeconds. Here are the return codes: int syswaitSUCCESS_ (=0) int syswaitPROCESSERROR_ (=1) int syswaitTIMEOUT_ (=3) waitTime parameters: int syswaitPIPEFAULT_ (=2) int syswaitINFINITE_ (=-1) |